import requests

from api.basic_api import BaseBuyerApi, BaseSellerApi
from common.encry_decry import md5
from common.file_load import load_yaml_file


class SellerLoginApi(BaseSellerApi):
    def __init__(self,username,password):
        super().__init__()#继承父类属性
        # self.session=requests.session()
        self.url =f'{self.host}/seller/login'
        # self.headers = {"Authorization": ""}
        # 表单参数
        self.method ='get'
        self.params = {
            "username": username,
            "password": md5(password),  # abc123456
            "captcha": load_yaml_file('/config/common.yml')['captcha'],
            "uuid": "sdahhdsjhashdhjsdh"
        }

